<include file="Public:header"/>
<link rel="stylesheet" type="text/css" href="../Public/css/index-htsc.css" />

<div class="search" style="margin-top: -2px;">
	<div class="search_detail">
		<p>已免费生成<strong>{:D('Order')->get_free_order_num()}</strong>份合同</p>
		<div class="clearfix box">
			<form action="{:U('search')}" method="get">
				<div style="float: left;font-size: 16px;line-height: 40px;margin-right: 10px;"><a href="{:URL('advanced')}" style="color: #fff;">专业版</a></div>
				<input type="text" name="keyword" placeholder="请输入合同名称，例如：合伙协议" class="text" style="width: 400px;" />
				<input type="submit" value="智能生成" class="btn" />
			</form>
		</div>
		<div class="hot_words">
			<volist name="hot_keyword" id="kw">
				<a href="{:URL('search', '', 'free_agreement_search')}?keyword={$kw}" style="color: #FFF;">{$kw}</a>
			</volist>
		</div>
	</div>
</div>
<div class="selector">
	<div class="wrap">
		<dl class="clearfix">
			<dt>创业必备</dt>
			<dd class="cur"><a href="{:U('search', array('type' => 'venture_agreement'))}">全部</a></dd>
			<volist name="venture_agreement_sort" id="rs">
				<dd>
					<a href="{:U('search', array('type' => 'venture_agreement'))}?category_id={$rs['id']}">
						{$rs['title']}
					</a>
				</dd>
			</volist>
		</dl>
		<dl class="clearfix">
			<dt>企业常用</dt>
			<dd class="cur"><a href="{:U('search', array('type' => 'enterprise_agreement'))}">全部</a></dd>
			<volist name="enterprise_agreement_sort" id="rs">
				<dd>
					<a href="{:U('search', array('type' => 'enterprise_agreement'))}?category_id={$rs['id']}">
						{$rs['title']}
					</a>
				</dd>
			</volist>
		</dl>
		<dl class="clearfix">
			<dt>个人合同</dt>
			<dd class="cur"><a href="{:U('search', array('type' => 'personal_agreement'))}">全部</a></dd>
			<volist name="personal_agreement_sort" id="rs">
				<dd>
					<a href="{:U('search', array('type' => 'personal_agreement'))}?category_id={$rs['id']}">
						{$rs['title']}
					</a>
				</dd>
			</volist>
		</dl>
	</div>
</div>

<div class="selector" style="background:#fff;padding-bottom:0px;">
	<div class="wrap">
		<dl class="clearfix cur-tit" style="border-bottom:0 none;">
			<dt>排序</dt>
			<dd class="{$order_by ? '' : 'cur'} cur-tit-con">
				<a href="{:URL('FreeAgreement/index', '', 'free_agreement')}">全部</a>
			</dd>
			<dd class="{$order_by == 'new' ? 'cur' : ''} cur-tit-con">
				<a href="{:URL('FreeAgreement/index', array('order_by' => 'new'), 'free_agreement')}?order_by=new">最新</a>
			</dd>
			<dd class="{$order_by == 'download_num' ? 'cur' : ''} cur-tit-con">
				<a href="{:URL('FreeAgreement/index', array('order_by' => 'download_num'), 'free_agreement')}?order_by=download_num">下载量</a>
			</dd>     
		</dl>
	</div>
</div>

<div class="wrap">
	<div class="contract">
		<ul class="custom-list">
			<volist name="list" id="rs">
				<li class="jump" url="{:URL('detail', array('agreement_id' => $rs['agreement_id']), 'free_agreement/detail_' . $rs['agreement_id'])}">
					<div class="title">{$rs['title']}</div>
					<div class="icon">
						<img class="unselect" src="{:img($rs['images_url'], 100, 100)}" height="72" width="72">
						<img class="selected" src="{:img($rs['images_url'], 100, 100)}" height="72" width="72">
					</div>
					<div class="desc-tit"><i class="if if-label"></i>{$rs['category_name']}</div>
					<div class="desc">{:str_cut($rs['description'], 100)}</div>
					<div class="btn-box">
						<a>立即生成</a>
					</div>
				</li>
			</volist>
		</ul>
		<div class="page">
			{$page}
		</div>
	</div>
</div>

<include file="Public:footer"/>